package com.hongye.auth.service.impl;

import com.hongye.auth.dao.LoginDao;
import com.hongye.auth.entity.RoleUserEntity;
import com.hongye.auth.entity.UserEntity;
import com.hongye.auth.service.LoginServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author hxy
 * @email 3199037134@qq.com
 * @date 2022/4/19 15:46
 */
@Service
public class LoginServerImpl implements LoginServer
{


    @Autowired
    LoginDao loginDao;

    @Override
    public UserEntity findUserMsg(String phone) {
        return loginDao.findUserMsg(phone);
    }

    @Override
    public RoleUserEntity IfUserIsBroker(Integer id) {
        //定义经济人的编号为1;
        Integer role=1;
        return loginDao.IfUserIsBroker(id,role);
    }
}
